#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
    cin >> n >> m;
    int x, cnt = 0;
    for (int i = 1; i <= n; i++) {
        cin >> x;
        if (x == m)
            cnt++;
    }
    cout << cnt;
    return 0;
}